<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <?php $this->load->view('head'); ?>
        <link type="text/css" href="<?php echo base_url()."css/redmond/jquery-ui-1.8.14.custom.css";?>" rel="stylesheet" />
        <link type="text/css" href="<?php echo base_url() . "css/estadisticas.css"; ?>" rel="stylesheet" />
        <script src="<?php echo base_url()."js/jquery-ui-1.8.14.custom.min.js";?>" type="text/javascript"></script>
        <title></title>
        <script src="<?php echo base_url()."js/raphael.js";?>" type="text/javascript" charset="utf-8"></script>
        <script src="<?php echo base_url()."js/g.raphael.js";?>" type="text/javascript" charset="utf-8"></script>
        <script src="<?php echo base_url()."js/g.pie.js";?>" type="text/javascript" charset="utf-8"></script>
        <script type="text/javascript">
            $(document).ready(function(){
                $("#fecIni").datepicker({dateFormat:"yy-mm-dd",changeMonth: true,changeYear: true, yearRange: '1941:<?php echo date('Y'); ?>' });
                $("#fecFin").datepicker({dateFormat:"yy-mm-dd",changeMonth: true,changeYear: true, yearRange: '1941:<?php echo date('Y'); ?>' });
                <?php $this->load->view('enReady'); ?>
            }); //fin $(document).ready(function(){
            function fnAbreDetalle(opc){
                window.open("<?php echo site_url("registrarInst/abreDetalle/")."/"; ?>" + opc, "Detalle", "width=1300,height=500,scrollbars=YES");
            }
        </script>
    </head>
    <body>
        <div id="divEstadistica" ></div>
        <div id="divEstadistica1" >
        <table>
            <caption>POSTULACIONES A OFERTAS LABORALES</caption>
            <?php if ($this->session->userdata("rolId") == "1") { ?>
                <tr>                
                    <td><label for="institucion">Instituciones</label></td>
                    <td colspan="4"><select id="institucion" name="institucion" title="Filtre por una institución en especifico">
                            <option value="">Todas</option>
                            <?php
                            foreach ($instituciones->result() as $row)
                                echo "<option value='{$row->institucionId}'>{$row->institucionRazon}</option>";
                            ?>
                        </select>
                    </td>
                </tr>
            <?php } ?>                
            <tr>
                <td><label for="fecIni">Fecha Inicial de la postualción</label></td>
                <td><input type="text" id="fecIni" name="fecIni" size="9" title="Fecha Inicial de la consulta" /> </td>
                <td><label for="fecFin">Fecha Final de la postualción</label></td>
                <td><input type="text" id="fecFin" name="fecFin" size="9" title="Fecha Final de la consulta" /> </td>
            </tr>
            <tr>
                <td colspan="4" style="text-align: center">
                    <input type="button" value="Consultar" onclick="$('#holder').html('');$('#divEstadistica').load('<?php echo site_url("registrarInst/llamaEstPersContra/ofertas"); ?>' + '/' + $('#institucion').val(),{fecIni:$('#fecIni').val(),fecFin:$('#fecFin').val()},function(){$('#ifrContenido', top.document).css('height',(document.body.scrollHeight + 90) + 'px');});"/>
                </td>
            </tr>
        </table>
        <div id="holder"></div>
    </body>
</html>
